home *** CD-ROM | disk | FTP | other *** search
- ATARI MACHINE SPECIFIC LIBRARY
-
-
-
- NAME
- ScanCode - access to the Atari keyboard keys
-
- SYNOPSIS
- #include <ScanCode.h>
-
- bool KeyPressed()
- int Key()
- char AsciiKey()
-
- #define ...
-
- DESCRIPTION
- ScanCode allows the programmer to read input from the keyboard,
- without echo, as either scancodes, or ASCII codes.
-
- FUNCTIONS
- KeyPressed() returns immediately. It returns TRUE if a call to
- Key would not wait, FALSE otherwise.
-
- Key() returns the scancode of the next key pressed. If no key
- is pressed, it waits.
-
- AsciiKey() returns the char of the next key pressed. If no key
- is pressed, it waits.
-
- EXAMPLES
- Do X until a key is pressed:
- while (!KeyPressed()) X;
-
- Process according to an input key:
- switch (Key()) {
- case KEY_A: ...
- break; case KEY_B: ...
- break; case KEY_C: ...
- }
- or:
- switch (AsciiKey()) {
- case 'a': ...
- break; case 'b': ...
- break; case 'c': ...
- }
-
- SEE ALSO
- stdio
-
- BUGS
- Keyboards in different countries have different mappings.
-
- AUTHOR
- Warwick Allison, 1992.
- warwick@cs.uq.oz.au
-
- COPYING
- This functionality is part of the Atari Machine Specific Library,
- and is Copyright 1992 by Warwick W. Allison.
-
- The Atari Machine Specific Library is free and protected under the
- GNU Library General Public License.
-
- You are free to copy and modify these sources, provided you acknowledge
- the origin by retaining this notice, and adhere to the conditions
- described in the GNU LGPL.
-